package com.lzx.adx.report.support.strategy.mpping;

import com.lzs.adx.commmon.utils.JsonUtils;
import com.lzx.adx.report.model.common.CommonReportRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
@Slf4j
public class CommonReportStrategy extends AbstractReportParamsMapping{
    @Override
    public CommonReportRequest adapter(Map<String, Object> params) {

        String jsonObject = JsonUtils.toJsonString(params);

        return JsonUtils.parseObject(jsonObject, CommonReportRequest.class);
    }
}
